home *** CD-ROM | disk | FTP | other *** search
- /* FileToNote(fname)
-
- Create a note containing the contents of the given text file, and
- locate it on the current page. The note has the same name as the file,
- and an arbitrary position and size that can be changed to suit. Other
- characteristics come from the default note, and the last note created.
- Beware of using this macro on anything other than short text files!
- */
-
- if open(fr, arg(1), 'r') then do
-
- note = createnote()
-
- do forever
-
- line = readln(fr) || '0a'x
-
- if eof(fr) then leave
-
- call inserttext(note, line, -1)
- end
-
- call close(fr)
-
- call scaletosize(note, 320, 80)
- call setposition(note, 60, 40)
- call setname(note, arg(1))
- call relocate(note, ':')
-
- end
-